<include file="public/header" />
<include file="public/left" />
<style>
	img:hover{;position:fixed;top:100px;width:auto;height: 80%;z-index: 999;}
</style>
<div id="toolTipLayer" style="position: absolute; z-index: 9999; display: none; visibility: visible; left: 95px; top: 573px;"></div>
<div id="append_parent"></div>
<div id="ajaxwaitid"></div>
<div class="page">
	<div class="fixed-bar">
		<div class="item-title"><a class="back" href="javascript:history.back();" title="返回列表">返回上一页</a>
			<div class="subject">
				<h3>商户详情</h3>
				<h5>网站系统权限资源管理</h5>
			</div>
		</div>
	</div>
	<form class="form-horizontal" id="adminHandle" method="post">
		<if condition="isset($data.id)">
		<input type="hidden" name="id" value="{$data.id}">
		</if>
		<div class="ncap-form-default">
			<dl class="row">
				<dt class="tit">姓名		</dt>
				<dd class="opt">
				 <if condition="isset($data.realname)">{$data.realname} </if>
					<p class="notic"></p>
				</dd>
			</dl>
			<dl class="row">
				<dt class="tit">手机号码		</dt>
				<dd class="opt">
					<if condition="isset($data.mobile)">{$data.mobile} </if>
					<p class="notic"></p>
				</dd>
			</dl>
			<dl class="row">
				<dt class="tit">身份证号码		</dt>
				<dd class="opt">
					<if condition="isset($data.idcard)">{$data.idcard} </if>
					<p class="notic"></p>
				</dd>
			</dl>
			<dl class="row">
				<dt class="tit">银行卡号码		</dt>
				<dd class="opt">
					<if condition="isset($data.bankcard)">{$data.bankcard} </if>
					<p class="notic"></p>
				</dd>
			</dl>
			<dl class="row">
				<dt class="tit">店铺名称		</dt>
				<dd class="opt">
					<if condition="isset($data.shopname)">{$data.shopname} </if>
					<p class="notic"></p>
				</dd>
			</dl>
			<dl class="row">
				<dt class="tit">店铺地址		</dt>
				<dd class="opt">
					<if condition="isset($data.address)">{$data.province}{$data.city}{$data.county}{$data.street}{$data.address} </if>
					<p class="notic"></p>
				</dd>
			</dl>
			<dl class="row">
				<dt class="tit">
					<em>*</em>身份证信息
				</dt>
				<dd class="opt">
					<table>
						<tr><th style="width:200px；text-align: center">身份证正面</th><th style="width: 200px;text-align: center;" >身份证反面</th><th style="width: 200px;text-align: center;" >手持身份证</th></tr>
						<tbody id="rightList">
						<tr><td style="width:200px；text-align: center;visibility:visible"><a target="_blank" href="__STATIC__/certificates/{$data.id_positive}"><img src="__STATIC__/certificates/{$data.id_positive}" height="100" alt=""></a></td>
							<td style="width: 200px;text-align: center;;visibility:visible" ><a target="_blank" href="__STATIC__/certificates/{$data.id_reverse}"><img src="__STATIC__/certificates/{$data.id_reverse}" height="100" alt=""></a></td>
							<td style="width: 200px;text-align: center;;visibility:visible" ><a target="_blank" href="__STATIC__/certificates/{$data.id_hold}"><img src="__STATIC__/certificates/{$data.id_hold}" height="100" alt=""></a></td></tr>
						<tr><td colspan="3"><div class="bot">
							<eq name="$data.isid" value="0">
								<div class="bot">
								<a class="btn red ncap-btn-big"  href="javascript:void(0)" data-url="{:url('merchant/isid')}" data-name="确定设置为通过状态?" data-id="{$data.id}" data-status="1" onclick="checkid(this)"><i class="fa fa-clock-o"></i>通过</a>
								<a class="btn red ncap-btn-big"  href="javascript:void(0)" data-url="{:url('merchant/isid')}" data-name="确定设置为不通过状态?" data-id="{$data.id}" data-status="-1" onclick="checkid(this)"><i class="fa fa-clock-o"></i>不通过</a>
							</div>
							</eq>
							<eq name="$data.isid" value="1">	<a class="btn ncap-btn-green">已认证</a></eq>
							<eq name="$data.isid" value="-10">	<a class="btn ncap-btn-red">认证失败</a></eq>
							</div>
						</td></tr>
						</tbody>
					</table>
				</dd>
			</dl>
			<dl class="row">
				<dt class="tit">
					<em>*</em>执照信息
				</dt>
				<dd class="opt">
					<table>
						<tr><th style="width:400px;text-align: center;">营业执照</th><th style="width: 400px;text-align: center;" >食品经营许可证</th></tr>
						<tbody id="rightList">
						<tr><td style="width:200px；text-align: center;"><a target="_blank" href="__STATIC__/certificates/{$data.license}"><img src="__STATIC__/certificates/{$data.license}" height="100" alt=""></a></td>
							<td style="width: 200px;text-align: center;" ><a target="_blank" href="__STATIC__/certificates/{$data.foodlicense}"><img src="__STATIC__/certificates/{$data.foodlicense}" height="100" alt=""></a></td>
						<tr><td><div class="bot">
							<eq name="$data.islicense" value="0">
								<div class="bot">
									<a class="btn red ncap-btn-big"  href="javascript:void(0)" data-url="{:url('merchant/license')}" data-type="islicense" data-name="确定设置为通过状态?" data-id="{$data.id}" data-status="1" onclick="checkid(this)"><i class="fa fa-clock-o"></i>通过</a>
									<a class="btn red ncap-btn-big"  href="javascript:void(0)" data-url="{:url('merchant/license')}" data-type="islicense" data-name="确定设置为不通过状态?" data-id="{$data.id}" data-status="-1" onclick="checkid(this)"><i class="fa fa-clock-o"></i>不通过</a>
								</div>
							</eq>
							<eq name="$data.islicense" value="1">	<a class="btn ncap-btn-green">已认证</a></eq>
							<eq name="$data.islicense" value="-1">	<a class="btn ncap-btn-red">认证失败</a></eq>
						</div>
						</td>
							<td><div class="bot">
								<eq name="$data.issafetygrade" value="0">
									<div class="bot">
										<a class="btn red ncap-btn-big"  href="javascript:void(0)" data-url="{:url('merchant/license')}" data-type="issafetygrade" data-name="确定设置为通过状态?" data-id="{$data.id}" data-status="1" onclick="checkid(this)"><i class="fa fa-clock-o"></i>通过</a>
										<a class="btn red ncap-btn-big"  href="javascript:void(0)" data-url="{:url('merchant/license')}" data-type="issafetygrade" data-name="确定设置为不通过状态?" data-id="{$data.id}" data-status="-1" onclick="checkid(this)"><i class="fa fa-clock-o"></i>不通过</a>
									</div>
								</eq>
								<eq name="$data.issafetygrade" value="1">	<a class="btn ncap-btn-green">已认证</a></eq>
								<eq name="$data.issafetygrade" value="-1">	<a class="btn ncap-btn-red">认证失败</a></eq>
							</div>
							</td>
						</tr>
						</tbody>
					</table>
				</dd>
			</dl>
			<if condition="isset($data.updatecontent)">
			<dl class="row">
				<dt class="tit">修改说明</dt>
				<dd class="opt">
					{$data.updatecontent}
					<p class="notic"></p>
				</dd>
			</dl>
			</if>
			<if condition="isset($data.updateimages)">
				<dl class="row">
					<dt class="tit">材料</dt>
					<dd class="opt">
						<volist name="data.updateimages" id="do">
							<a target="_blank" href="__STATIC__/uploads/{$do}"><img src="__STATIC__/uploads/{$do}" height="100" alt=""></a>
						</volist>
						<p class="notic"></p>
					</dd>
				</dl>
			</if>
		</div>
	</form>
</div>
<script type="text/javascript">
	function checkid(obj) {
		// 删除按钮
		var confirm=$(obj).attr('data-name');
		layer.confirm(confirm, {
			btn: ['确定', '取消'] //按钮
		}, function () {
			$.ajax({
				type: 'post',
				url: $(obj).attr('data-url'),
				data : {id:$(obj).attr('data-id'),status:$(obj).attr('data-status'),type:$(obj).attr('data-type')},
				dataType: 'json',
				success: function (data) {
					if (data == 1) {
						window.location.reload();
					} else {
						layer.alert('操作失败', {icon: 2});  //alert('删除失败');
					}
				}
			})
		}, function () {
		});
	}
</script>
</body>
</html>